﻿CREATE TABLE [dbo].[Order] (
    [OrdreNr]        INT           IDENTITY (1, 1) NOT NULL,
    [KundeNr]        INT           NOT NULL,
    [LeveringAtt]    NVARCHAR (50) NULL,
    [LeveringNavn]   NVARCHAR (50) NULL,
    [LeveringGade]   NVARCHAR (50) NULL,
    [LeveringPostNr] INT           NULL,
    [LeveringBy]     NVARCHAR (50) NULL,
    [Oprettet]       DATETIME      NOT NULL,
    [OrdreReference] NVARCHAR (50) NULL,
    CONSTRAINT [PK_Order] PRIMARY KEY CLUSTERED ([OrdreNr] ASC),
    CONSTRAINT [FK_Order_Customer] FOREIGN KEY ([KundeNr]) REFERENCES [dbo].[Customer] ([TelefonNr])
);

